package cn.jsu.oj.judgment.strategy;

import static cn.jsu.oj.judgment.config.DataStructureConfig.taskQueue;

import cn.jsu.oj.judgment.pojo.AbstractPack;
import cn.jsu.oj.judgment.pojo.TaskInfo;
import lombok.extern.slf4j.Slf4j;

import static cn.jsu.oj.judgment.thread.ApplyTaskThread.taskCount;
/**
 * 判题任务包 12
 *
 */
@Slf4j
public class JudgeTaskHandle implements ApplyRolePackHandle{

    @Override
    public void handle(AbstractPack abstractPack, int ct) throws Exception {
        TaskInfo taskInfo = (TaskInfo) abstractPack;
        taskCount--;
        taskQueue.put(taskInfo);
        log.info("开始放入任务队列  ,任务队列大小: {}",taskQueue.size());


    }
}
